#!/bin/bash


log_file=$1.log
ps aux |grep $1 |grep -v 'grep' |grep -v $0 |awk '{print $2}' |xargs kill -9
sleep 2
#cp $1 ~/apps
cd ~/apps
nohup java -Duser.timezone=Asia/Shanghai  -jar -Xms500M -Xmx1G $1 --spring.main.allow-bean-definition-overriding=true > $log_file &
tail -f $log_file
